<?php

namespace App\Admin\Exports\Sheet;

use App\Models\Data\ClickLearnSpell;
use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\WithHeadings;
use Maatwebsite\Excel\Concerns\WithTitle;

class ClickLearnSpellSheet implements FromCollection, WithHeadings, WithTitle
{
    public function collection()
    {

        return ClickLearnSpell::query()->select([
            'id', 'click_learn_id', 'name', 'time', 'color', 'is_option', 'end_time'
        ])->get();
    }

    public function headings(): array
    {
        return  [
            '拼写变色编号', '资源/内容编号', '名称', '卡点时间', '变色', '是否为选项', '结束时间'
        ];
    }

    public function title(): string
    {
        return '拼写变色';
    }
}
